package com.jifeng.api.crud.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jifeng.api.crud.dao.UserMenuDao;
import com.jifeng.api.crud.entity.UserMenuEntity;
import com.jifeng.api.crud.service.UserMenuService;
import com.jifeng.api.utils.PageUtils;
import com.jifeng.api.utils.Query;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("userMenuService")
public class UserMenuServiceImpl extends ServiceImpl<UserMenuDao, UserMenuEntity> implements UserMenuService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<UserMenuEntity> page = this.page(
                new Query<UserMenuEntity>().getPage(params),
                new QueryWrapper<UserMenuEntity>()
        );

        return new PageUtils(page);
    }

}